import request2 from '@/utils/request2'
import request from '@/utils/request'
import { contractApiUrl, materialApiUrl } from '../../config'


export default {
    // 下拉框选择
    typeslabel(data, params) {
        return request2({
            url: contractApiUrl + '/contract/typeslabel', method: 'post', params, data
        })
    },
    //查看页面分公司公司评审打印
    comAuditInfoPrint(data, params) {
        return request2({
            url: contractApiUrl + '/general-contract-print/comAuditInfoPrint', method: 'post', params, data
        })
    },
    //查看页面分公司分公司评审打印
    branchComAuditInfoPrint(data, params) {
        return request2({
            url: contractApiUrl + '/general-contract-print/branchComAuditInfoPrint', method: 'post', params, data
        })
    },
    //打印
    comReviwPrint(data, params) {
        return request2({
            url: contractApiUrl + '/general-contract-print/comReviwPrint', method: 'get', params, data
        })
    },
    //总包合同—风险复核—打印
    DangerReviewPrint(data, params) {
        return request2({
            url: contractApiUrl + '/risk_review/print?id=' + params.id,
            method: 'get',
        })
    },
    //总包合同—合同变更—打印
    contractChange(data, params) {
        return request2({
            url: contractApiUrl + '/general-contract-print/general/change?id=' + params.id,
            method: 'get',
        })
    },
    //打印
    applyForAuthorityPrint(data, params) {
        return request2({
            url: contractApiUrl + '/general-contract-print/applyForAuthorityPrint', method: 'get', params, data
        })
    },
    //用印申请打印
    sealPrint(data, params) {
        return request2({
            url: contractApiUrl + '/general-contract-print/contract/seal', method: 'get', params, data
        })
    },
    //成本分析表打印
    analysisPrint(data, params) {
        return request2({
            url: contractApiUrl + '/general-contract-print/cost/analysis', method: 'get', params, data
        })
    },
    // 重大风险化解措施打印
    risksPrint(data, params) {
        return request2({
            url: contractApiUrl + '/general-contract-print/major/risks', method: 'get', params, data
        })
    },
    // 资金策划表
    fundPlanningPrint(data, params) {
        return request2({
            url: contractApiUrl + '/general-contract-print/projectFundPlanTable', method: 'get', params, data
        })
    },
    //总包合同基本信息-新增
    createByMain(data, params) {
        return request2({
            url: contractApiUrl + '/general-contract/createByMain', method: 'post', params, data
        })
    },
    //总包合同—删除
    deleteBymain(data, params) {
        return request2({
            url: contractApiUrl + '/general-contract/deleteBymain', method: 'delete', params, data
        })
    },
    // 总包合同-分公司评审-修改
    editBranchComAuditInfoById(data, params) {
        return request2({
            url: contractApiUrl + '/general-contract/editBranchComAuditInfoById', method: 'post', params, data
        })
    },
    // 总包合同-公司评审-修改
    editComAuditInfoById(data, params) {
        return request2({
            url: contractApiUrl + '/general-contract/editComAuditInfoById', method: 'post', params, data
        })
    },
    // 总包合同-分页查询
    findListByMain(data) {
        return request2({
            url: contractApiUrl + '/general-contract/findListByMain', method: 'post', data
        })
    },
    //总包合同基本信息-详情
    findListByMainId(data, params) {
        return request2({
            url: contractApiUrl + '/general-contract/findListByMainId', method: 'get', params, data
        })
    },
    // 总包合同基本信息-编辑
    editByMain(data, params) {
        return request2({
            url: contractApiUrl + '/general-contract/editByMain', method: 'post', params, data
        })
    },
    // 总包合同-公司评审-新增/修改
    updateComReview(data, params) {
        return request2({
            url: contractApiUrl + '/general-contract/updateComReview', method: 'post', params, data
        })
    },

    // 总包合同-分公司评审-列表
    findBranchComAuditInfoByBaseId(data, params) {
        return request2({
            url: contractApiUrl + '/general-contract/findBranchComAuditInfoByBaseId', method: 'post', params, data
        })
    },
    // 总包合同-公司评审-列表
    finComAuditInfoByBaseId(data, params) {
        return request2({
            url: contractApiUrl + '/general-contract/finComAuditInfoByBaseId', method: 'post', params, data
        })
    },
    // 总包合同-公司评审-详情
    findComReviewByBaseId(data, params) {
        return request2({
            url: contractApiUrl + '/general-contract/findComReviewByBaseId',
            method: 'get',
            params,
            data
        })
    },
    // 总包合同-授权申请-详情
    findApplyForAuthorityByBaseId(data, params) {
        return request2({
            url: contractApiUrl + '/general-contract/findApplyForAuthorityByBaseId',
            method: 'get',
            params,
            data
        })
    },
    // 总包合同-公司评审-选项数据重大风险、实质评审、相关部门
    findCompanyTreeLabel(data, params) {
        return request2({
            url: contractApiUrl + '/general-contract/findCompanyTreeLabel', method: 'get', params, data
        })
    },
    // 总包合同-授权申请-新增/修改
    updateApplyForAuthority(data, params) {
        return request2({
            url: contractApiUrl + '/general-contract/updateApplyForAuthority', method: 'post', params, data
        })
    },

    // 总包合同-用印申请-新增/修改
    updateApplyForSeal(data, params) {
        return request2({
            url: contractApiUrl + '/general-contract/updateApplyForSeal', method: 'post', params, data
        })
    },
    // 总包合同-用印申请-详情
    findApplyForSealByBaseId(data, params) {
        return request2({
            url: contractApiUrl + '/general-contract/findApplyForSealByBaseId',
            method: 'get',
            params,
            data
        })
    },
    // 总包合同-成本分析表-详情
    findGeneralContractCostAnalysisByBaseId(data, params) {
        return request2({
            url: contractApiUrl + '/general-contract/findGeneralContractCostAnalysisByBaseId',
            method: 'get',
            params,
            data
        })
    },
    // 总包合同-成本分析表-树形数据
    findGeneralContractCostAnalysisLabel(data, params) {
        return request2({
            url: contractApiUrl + '/general-contract/findGeneralContractCostAnalysisLabel/',
            method: 'get',
            params,
            data
        })
    },
    // 总包合同-资金策划表-详情
    findProjectFundPlanTableByBaseId(data, params) {
        return request2({
            url: contractApiUrl + '/general-contract/findProjectFundPlanTableByBaseId',
            method: 'get',
            params,
            data
        })
    },
    // 总包合同-成本分析表-新增/修改
    updateGeneralContractCostAnalysis(data, params) {
        return request2({
            url: contractApiUrl + '/general-contract/updateGeneralContractCostAnalysis', method: 'post', params, data
        })
    },
    // 总包合同-资金策划表-新增/修改
    updateProjectFundPlanTable(data, params) {
        return request2({
            url: contractApiUrl + '/general-contract/updateProjectFundPlanTable', method: 'post', params, data
        })
    },
    // 总包合同-重大风险化解措施-新增/修改
    updateMajorRisks(data, params) {
        return request2({
            url: contractApiUrl + '/general-contract/updateMajorRisks', method: 'post', params, data
        })
    },
    // /general-contract/findMajorRisksByBaseId/{baseId}
    // 总包合同-重大风险化解措施-详情
    findMajorRisksByBaseId(data, params) {
        return request2({
            url: contractApiUrl + '/general-contract/findMajorRisksByBaseId',
            method: 'get',
            params,
            data
        })
    },
    // 总包合同-风险复核-详情
    DangerReviewByBaseId(data, params) {
        return request2({
            url: contractApiUrl + '/risk_review/queryById',
            method: 'get',
            params,
            data
        })
    },
    // 总包合同-风险复核-详情
    findDangerReviewByBaseId(data, params) {
        return request({
            url: contractApiUrl + `/risk_review/queryByGenId`,
            method: 'get',
            params
        })
    },
    // 附件列表
    findFileList(data, params) {
        return contractApiUrl + '/general-contract/findFileList'
    },
    // 删除附件
    deleteFile(data, params) {
        return contractApiUrl + '/general-contract/deleteFile'
    },
    // 添加附件
    addFile(data, params) {
        return contractApiUrl + '/general-contract/addFile'
    },
    // 提交审批
    generalSubmit(data, params) {
        return request2({
            url: contractApiUrl + '/general-contract/generalSubmit', method: 'post', params, data
        })
    },

    //总包合同-授权申请-历史数据-详情
    findApplyForAuthorityHistoryByBusinessId(data, params) {
        return request2({
            url: contractApiUrl + '/general-contract/findApplyForAuthorityHistoryByBusinessId/' + params.businessId,
            method: 'get',
            params: {},
            data
        })
    },
    // 总包合同-用印申请-历史数据-详情
    findApplyForSealHistoryByBusinessId(data, params) {
        return request2({
            url: contractApiUrl + '/general-contract/findApplyForSealHistoryByBusinessId/' + params.businessId,
            method: 'get',
            params: {},
            data
        })
    },
    // 总包合同-基本信息变更-历史数据-详情
    findGeneralContractHistoryByBusinessId(data, params) {
        return request2({
            url: contractApiUrl + '/general-contract/findGeneralContractHistoryByBusinessId/' + params.businessId,
            method: 'get',
            params: {},
            data
        })
    },
    // 总包合同-公司评审-历史数据-详情
    findComReviewHistoryByBusinessId(data, params) {
        return request2({
            url: contractApiUrl + '/general-contract/findComReviewHistoryByBusinessId/' + params.businessId,
            method: 'get',
            params: {},
            data
        })
    },
    // 总包合同-成本分析表-历史数据-详情
    findGeneralContractCostAnalysisHistoryByBusinessId(data, params) {
        return request2({
            url: contractApiUrl + '/general-contract/findGeneralContractCostAnalysisHistoryByBusinessId/' + params.businessId,
            method: 'get',
            params: {},
            data
        })
    },
    // 总包合同-重大风险化解措施-历史数据-详情
    findGeneralContractMajorRisksHistoryByBusinessId(data, params) {
        return request2({
            url: contractApiUrl + '/general-contract/findGeneralContractMajorRisksHistoryByBusinessId/' + params.businessId,
            method: 'get',
            params: {},
            data
        })
    },
    // 总包合同-资金策划表-历史数据-详情
    findProjectFundPlanTableHistoryByBusinessId(data, params) {
        return request2({
            url: contractApiUrl + '/general-contract/findProjectFundPlanTableHistoryByBusinessId/' + params.businessId,
            method: 'get',
            params: {},
            data
        })
    },
    // 总包合同-授权申请-历史数据-列表
    findListApplyForAuthorityHistory(data, params) {
        return request2({
            url: contractApiUrl + '/general-contract/findListApplyForAuthorityHistory/' + params.id,
            method: 'get',
            params: {},
            data
        })
    },
    // 总包合同-用印申请-历史数据-列表
    findListApplyForSealHistory(data, params) {
        return request2({
            url: contractApiUrl + '/general-contract/findListApplyForSealHistory/' + params.id,
            method: 'get',
            params: {},
            data
        })
    },
    // 总包合同-重大风险化解措施-历史数据-列表
    findListByGeneralContractMajorRisksHistory(data, params) {
        return request2({
            url: contractApiUrl + '/general-contract/findListByGeneralContractMajorRisksHistory/' + params.id,
            method: 'get',
            params: {},
            data
        })
    },
    // 总包合同-公司评审-历史数据-列表
    findListCompanyReviewHistory(data, params) {
        return request2({
            url: contractApiUrl + '/general-contract/findListCompanyReviewHistory/' + params.id,
            method: 'get',
            params: {},
            data
        })
    },
    //总包合同-成本分析表-历史数据-列表
    findListGeneralContractCostAnalysisHistory(data, params) {
        return request2({
            url: contractApiUrl + '/general-contract/findListGeneralContractCostAnalysisHistory/' + params.id,
            method: 'get',
            params: {},
            data
        })
    },
    //总包合同-资金策划表-历史数据-列表
    findListProjectFundPlanTable(data, params) {
        return request2({
            url: contractApiUrl + '/general-contract/findListProjectFundPlanTable/' + params.id,
            method: 'get',
            params: {},
            data
        })
    },
    // 总包合同-基本信息-历史数据-列表
    findListGeneralContractHistory(data, params) {
        return request2({
            url: contractApiUrl + '/general-contract/findListGeneralContractHistory/' + params.id,
            method: 'get',
            params: {},
            data
        })
    },

}
